﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<DIS_WEB_Client.ViewModels.GroupViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent2" runat="server">
<script type="text/javascript">
    function ValidateLogin() {
        var username = document.getElementsByName("username").item(0);
        if (username.value == "") {
            alert("Please input username");
            return false;
        }
        var password = document.getElementsByName("password").item(0);
        if (password.value == "") {
            alert("Please input password");
            return false;
        }
        return true;
    }
</script>
<table width="560" border="0" cellspacing="0" cellpadding="0">
    <tbody>
        <tr>
        <td valign="top">
        <!-- MAIN -->

            <div class="page_title" style="width: 556px">
                <div class="text">
                    Authentication
                </div>
            </div>

            <% using (Html.BeginForm("Login", "Home", FormMethod.Post, new { onsubmit = "return ValidateLogin();" }))
               { %>
			<table width="100%" border="0" cellpadding="0" cellspacing="0" style="text-align:left">
			    <tbody>
                    <tr><td colspan="2">&nbsp;</td></tr>
			        <tr bgcolor="#e8ecee"><td colspan="2"><div style="margin: 5px 5px 5px 10px;"><b>Username &amp; Password</b></div></td></tr>
			        <tr bgcolor="#f6fbfd">
				        <td valign="top"><div style="margin: 5px 5px 5px 10px;"><b>Username *</b></div></td>
				        <td valign="top">
                            <div style="margin: 5px 10px 5px 5px;">
                                <%= Html.TextBox("username", string.Empty, new { @style = "width: 200px;" })%>
                            </div>
                        </td>
			        </tr>
			        <tr>
				        <td valign="top"><div style="margin: 5px 5px 5px 10px;"><b>Password *</b></div></td>
				        <td valign="top">
                            <div style="margin: 5px 10px 5px 5px;">
                                <%= Html.Password("password", string.Empty, new { @style = "width: 200px;" })%>
                            </div>
                        </td>
			        </tr>
                    <tr>
						<td height="20" style="width: 130px">
						</td>
						<td height="20">
							<div style="margin: 5px 10px 5px 5px;">
								<br/>
                                <input type="submit" name="sbt" id="sbt" value="Login" style="background-image: url(../../../Content/Images/bgbutton.jpg); color: #FFFFFF; font-size: 16px; font-weight: bold; border: 1px #DBDBDB solid; height: 30px; cursor:pointer;" />
								<p>
								</p>
							</div>
						</td>
					</tr>
                </tbody>
			    <!-- MAIN END -->
            </table>
        <% } %>
	</td></tr>
	</tbody>
</table>
</asp:Content>
